package com.sunmouse.block;

import javax.print.attribute.standard.PrinterLocation;

import com.sunmouse.util.PrintUtil;


public class SubClass extends RootClass{
    public SubClass(){
    	/**
    	 * differences between this and super
    	 * no.1 this can be used to visit all methods includes subclass`s and rootclass`s
    	 * no.2 super can be only used to visit the methods of subclass`s 
    	 */
    	PrintUtil.pln("I am Sub class");
    	PrintUtil.pln(this.sum(5, 3));
    	PrintUtil.pln(this.max(5, 3));
    	PrintUtil.pln(super.max(5, 3));
    }
    
    public int sum(int a,int b){
    	return a+b;
    }

	@Override
	public int max(int a, int b) {
		// TODO Auto-generated method stub
		return super.max(a, b);
	}

	@Override
	public void tip() {
		// TODO Auto-generated method stub
		PrintUtil.pln("I wanna accompany my little sister");
		super.tip();
	}
    
}
